From: Jim Meyering Date: Sun, 24 Oct 2010 16:00:57 +0000 (-0400) Subject: * emacs.c (argmatch): Don't treat "--" as "--chdir". X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~5965 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=206699144fed58012c578190a6a94f404bea0876;p=emacs.git * emacs.c (argmatch): Don't treat "--" as "--chdir". --- diff --git a/src/ChangeLog b/src/ChangeLog index 0923708a065..e5d66491832 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2010-10-24 Jim Meyering + + * emacs.c (argmatch): Don't treat "--" as "--chdir". + 2010-10-24 Glenn Morris * w16select.c (syms_of_win16select) : diff --git a/src/emacs.c b/src/emacs.c index 70a0fae4ebf..e83725ccf03 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -829,13 +829,14 @@ main (int argc, char **argv) printf ("see the file named COPYING.\n"); exit (0); } - if (argmatch (argv, argc, "-chdir", "--chdir", 2, &ch_to_dir, &skip_args)) - if (chdir (ch_to_dir) == -1) - { - fprintf (stderr, "%s: Can't chdir to %s: %s\n", - argv[0], ch_to_dir, strerror (errno)); - exit (1); - } + + if (argmatch (argv, argc, "-chdir", "--chdir", 4, &ch_to_dir, &skip_args)) + if (chdir (ch_to_dir) == -1) + { + fprintf (stderr, "%s: Can't chdir to %s: %s\n", + argv[0], ch_to_dir, strerror (errno)); + exit (1); + } #ifdef HAVE_PERSONALITY_LINUX32